/**
 * Generate time : 2010-11-26 10:20:02
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.domain;

import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZM01 table comment : 代码详情表
 */
public class ZM01 extends DaoEPBase {

	private String codesetCode = " "; /* 代码分类编号 */
	private String itemCode = " "; /* 代码明细编号 */
	private String itemCname = " "; /* 代码明细中文名称 */
	private String itemEname = " "; /* 代码明细英文名称 */
	private String remark = " "; /* 备注 */
	private String itemStatus = " "; /* 代码状态 */
	private String sortId = " "; /* 顺序号 */
	private String status = " "; /* 字段状态 */
	private String recCreator = " "; /* 记录创建责任者 */
	private String recCreateTime = " "; /* 记录创建时刻 */
	private String recRevisor = " "; /* 记录修改责任者 */
	private String recReviseTime = " "; /* 记录修改时刻 */
	private String archiveFlag = " "; /* 归档标记 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("codesetCode");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(64);
		eiColumn.setDescName("代码分类编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("itemCode");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(64);
		eiColumn.setDescName("代码明细编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("itemCname");
		eiColumn.setFieldLength(255);
		eiColumn.setDescName("代码明细中文名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("itemEname");
		eiColumn.setFieldLength(255);
		eiColumn.setDescName("代码明细英文名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("remark");
		eiColumn.setFieldLength(255);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("itemStatus");
		eiColumn.setFieldLength(2);
		eiColumn.setDescName("代码状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("sortId");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("顺序号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("status");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("字段状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("recCreator");
		eiColumn.setFieldLength(256);
		eiColumn.setDescName("记录创建责任者");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("recCreateTime");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("记录创建时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("recRevisor");
		eiColumn.setFieldLength(256);
		eiColumn.setDescName("记录修改责任者");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("recReviseTime");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("记录修改时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("archiveFlag");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("归档标记");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZM01() {
		initMetaData();
	}

	/**
	 * get the codesetCode - 代码分类编号
	 * 
	 * @return the codesetCode
	 */
	public String getCodesetCode() {
		return this.codesetCode;
	}

	/**
	 * set the codesetCode - 代码分类编号
	 */
	public void setCodesetCode(String codesetCode) {
		this.codesetCode = codesetCode;
	}

	/**
	 * get the itemCode - 代码明细编号
	 * 
	 * @return the itemCode
	 */
	public String getItemCode() {
		return this.itemCode;
	}

	/**
	 * set the itemCode - 代码明细编号
	 */
	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}

	/**
	 * get the itemCname - 代码明细中文名称
	 * 
	 * @return the itemCname
	 */
	public String getItemCname() {
		return this.itemCname;
	}

	/**
	 * set the itemCname - 代码明细中文名称
	 */
	public void setItemCname(String itemCname) {
		this.itemCname = itemCname;
	}

	/**
	 * get the itemEname - 代码明细英文名称
	 * 
	 * @return the itemEname
	 */
	public String getItemEname() {
		return this.itemEname;
	}

	/**
	 * set the itemEname - 代码明细英文名称
	 */
	public void setItemEname(String itemEname) {
		this.itemEname = itemEname;
	}

	/**
	 * get the remark - 备注
	 * 
	 * @return the remark
	 */
	public String getRemark() {
		return this.remark;
	}

	/**
	 * set the remark - 备注
	 */
	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * get the itemStatus - 代码状态
	 * 
	 * @return the itemStatus
	 */
	public String getItemStatus() {
		return this.itemStatus;
	}

	/**
	 * set the itemStatus - 代码状态
	 */
	public void setItemStatus(String itemStatus) {
		this.itemStatus = itemStatus;
	}

	/**
	 * get the sortId - 顺序号
	 * 
	 * @return the sortId
	 */
	public String getSortId() {
		return this.sortId;
	}

	/**
	 * set the sortId - 顺序号
	 */
	public void setSortId(String sortId) {
		this.sortId = sortId;
	}

	/**
	 * get the status - 字段状态
	 * 
	 * @return the status
	 */
	public String getStatus() {
		return this.status;
	}

	/**
	 * set the status - 字段状态
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * get the recCreator - 记录创建责任者
	 * 
	 * @return the recCreator
	 */
	public String getRecCreator() {
		return this.recCreator;
	}

	/**
	 * set the recCreator - 记录创建责任者
	 */
	public void setRecCreator(String recCreator) {
		this.recCreator = recCreator;
	}

	/**
	 * get the recCreateTime - 记录创建时刻
	 * 
	 * @return the recCreateTime
	 */
	public String getRecCreateTime() {
		return this.recCreateTime;
	}

	/**
	 * set the recCreateTime - 记录创建时刻
	 */
	public void setRecCreateTime(String recCreateTime) {
		this.recCreateTime = recCreateTime;
	}

	/**
	 * get the recRevisor - 记录修改责任者
	 * 
	 * @return the recRevisor
	 */
	public String getRecRevisor() {
		return this.recRevisor;
	}

	/**
	 * set the recRevisor - 记录修改责任者
	 */
	public void setRecRevisor(String recRevisor) {
		this.recRevisor = recRevisor;
	}

	/**
	 * get the recReviseTime - 记录修改时刻
	 * 
	 * @return the recReviseTime
	 */
	public String getRecReviseTime() {
		return this.recReviseTime;
	}

	/**
	 * set the recReviseTime - 记录修改时刻
	 */
	public void setRecReviseTime(String recReviseTime) {
		this.recReviseTime = recReviseTime;
	}

	/**
	 * get the archiveFlag - 归档标记
	 * 
	 * @return the archiveFlag
	 */
	public String getArchiveFlag() {
		return this.archiveFlag;
	}

	/**
	 * set the archiveFlag - 归档标记
	 */
	public void setArchiveFlag(String archiveFlag) {
		this.archiveFlag = archiveFlag;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setCodesetCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("codesetCode")), codesetCode));
		setItemCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemCode")), itemCode));
		setItemCname(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemCname")), itemCname));
		setItemEname(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemEname")), itemEname));
		setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark));
		setItemStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("itemStatus")), itemStatus));
		setSortId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("sortId")), sortId));
		setStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("status")), status));
		setRecCreator(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("recCreator")), recCreator));
		setRecCreateTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("recCreateTime")), recCreateTime));
		setRecRevisor(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("recRevisor")), recRevisor));
		setRecReviseTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("recReviseTime")), recReviseTime));
		setArchiveFlag(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("archiveFlag")), archiveFlag));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("codesetCode", StringUtils.toString(codesetCode, eiMetadata.getMeta("codesetCode")));
		map.put("itemCode", StringUtils.toString(itemCode, eiMetadata.getMeta("itemCode")));
		map.put("itemCname", StringUtils.toString(itemCname, eiMetadata.getMeta("itemCname")));
		map.put("itemEname", StringUtils.toString(itemEname, eiMetadata.getMeta("itemEname")));
		map.put("remark", StringUtils.toString(remark, eiMetadata.getMeta("remark")));
		map.put("itemStatus", StringUtils.toString(itemStatus, eiMetadata.getMeta("itemStatus")));
		map.put("sortId", StringUtils.toString(sortId, eiMetadata.getMeta("sortId")));
		map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status")));
		map.put("recCreator", StringUtils.toString(recCreator, eiMetadata.getMeta("recCreator")));
		map.put("recCreateTime", StringUtils.toString(recCreateTime, eiMetadata.getMeta("recCreateTime")));
		map.put("recRevisor", StringUtils.toString(recRevisor, eiMetadata.getMeta("recRevisor")));
		map.put("recReviseTime", StringUtils.toString(recReviseTime, eiMetadata.getMeta("recReviseTime")));
		map.put("archiveFlag", StringUtils.toString(archiveFlag, eiMetadata.getMeta("archiveFlag")));

		return map;

	}
}